package tech.lq0.dreamaticvoyage.gui.slot;

import net.minecraft.network.chat.Component;

/**
 * Code based on @GoryMoon's Chargers
 */
public class SimpleComponentData implements ContainerComponentData {

    private final Component[] data;

    public SimpleComponentData(int size) {
        this.data = new Component[size];
    }

    @Override
    public Component get(int index) {
        return this.data[index];
    }

    @Override
    public void set(int index, Component value) {
        this.data[index] = value;
    }

    @Override
    public int getCount() {
        return this.data.length;
    }
}
